package com.a01_2021.thousandstimes.general.service;

import com.a01_2021.thousandstimes.exception.CustomException;
import com.a01_2021.thousandstimes.general.entity.Experience;
import com.a01_2021.thousandstimes.instance.entity.Position;
import com.baomidou.mybatisplus.extension.service.IService;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author FRQ
 * @since 2021-02-22
 */
public interface ExperienceService extends IService<Experience> {

    String getCurrentTitle(long userId) throws CustomException;

    long getCurrentExperienceId(long userId, LocalDate date) throws CustomException;

    int getCount(long userId);

    long getPositionId(long userId) throws CustomException;

    Experience getCurrentExperience(long userId) throws CustomException;

    Experience add(Experience experience) throws CustomException;

    List<Experience> get(long userId);

    List<Experience> getFromUserId(long userId) throws CustomException;

    Experience changePosition(long userId, Position position, long instanceId) throws CustomException;

    List<Experience> getFromInstanceIdAndUserId(long userId, long instanceId);

    Map<Long, Long> addIntoMaster(List<Experience> experienceList);
}
